package cn.yj.core.business.service.iservice;

import cn.yj.annotation.pagehelper.page.Page;
import cn.yj.cgs.dba.entity.Images;
import cn.yj.cgs.dba.entity.Product;
import cn.yj.cgs.dba.entity.vo.ProductFormVo;
import cn.yj.cgs.dba.entity.vo.ProductVo;
import cn.yj.common.NameValue;
import cn.yj.entity.R;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * @author 永健
 * @since 2021-06-15 16:17
 */
public interface IProductService extends IService<Product> {
    Page<ProductVo> pageList(Map<String, Object> params, Page<ProductVo> page);

    void viewCountAdd(String userCode, String productNo);

    List<NameValue> getTypesList();

    int deleteProductImg(Integer[] imgId);

    List<Images> selectProductImg(String productNo);

    ProductVo selectByNo(String productNo);
    ProductVo editByNo(String productNo);

    R save(ProductFormVo entity);

    R updateById(ProductFormVo entity);

    Page<ProductVo> getMyProduct(Map<String, Object> params, Page<ProductVo> page);

    boolean updateStatus(Map<String, Object> params);

    boolean polish(Map<String, Object> params);

    boolean deleteByNo(Map<String, Object> params);
}
